<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class ModifyAuthorizationRequestDefaultStatus extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('authorization_requests', function(Blueprint $blueprint) {
            $blueprint->dropColumn('status');

        });

        Schema::table('authorization_requests', function(Blueprint $blueprint) {
            $blueprint->boolean('status')->unsigned()->comment('申请状态，分别有 0 - 拒绝，1 - 申请中，2 - 已授权')->default(1);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
